home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / gcc / ixemlsrc.lha / ixemul / ixnet / utils.h < prev    next >
C/C++ Source or Header  |  1996-03-13  |  3KB  |  106 lines

  1. /*
  2.  *  This file is part of ixnet.library for the Amiga.
  3.  *  Copyright (C) 1996 Jeff Shepherd
  4.  *
  5.  *  This library is free software; you can redistribute it and/or
  6.  *  modify it under the terms of the GNU Library General Public
  7.  *  License as published by the Free Software Foundation; either
  8.  *  version 2 of the License, or (at your option) any later version.
  9.  *
  10.  *  This library is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  *  Library General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU Library General Public
  16.  *  License along with this library; if not, write to the Free
  17.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  *
  19.  *  $Id:$
  20.  *
  21.  *  $Log: $
  22.  *
  23.  */
  24.  
  25. /* prototypes for btree, database functions */
  26. #ifndef _UTILS_H
  27. #define _UTILS_H
  28.  
  29. #include "hash.h"
  30. #include "page.h"
  31. #include "btree.h"
  32. #include <db.h>
  33.  
  34. int _bt_buildret(BTREE_P, DATUM *, DBT *, DBT *);
  35. int _bt_cmp(BTREE_P, char *, index_t);
  36. int _bt_push(BTREE_P, pgno_t);
  37. pgno_t _bt_pop(BTREE_P);
  38. #ifdef DEBUG
  39. void _btdump(BTREE);
  40. #endif
  41. /* seq.c */
  42. int _bt_seqinit(BTREE_P, DBT *, int);
  43. int _bt_seqadvance(BTREE_P, int);
  44. /* delete.c */
  45. int _bt_crsrdel(BTREE_P);
  46. int _bt_delone(BTREE_P, index_t);
  47. /* big.c */
  48. int _bt_getbig(BTREE_P, pgno_t, char **, int *);
  49. int _bt_delindir(BTREE_P, pgno_t);
  50. int _bt_indirect(BTREE_P, DBT *, pgno_t *);
  51. int _bt_markchain(BTREE_P, pgno_t);
  52. /* storage.c */
  53. int _bt_getpage(BTREE_P, pgno_t);
  54. int _bt_getmpage(BTREE_P, pgno_t);
  55. int _bt_getdpage(BTREE_P, pgno_t);
  56. int _bt_pgout(BTHEADER *, char *);
  57. int _bt_pgin(BTHEADER *, char *);
  58. BTHEADER *_bt_allocpg(BTREE_P);
  59. int _bt_write(BTREE_P, BTHEADER *, int);
  60. int _bt_release(BTREE_P, BTHEADER *);
  61. int _bt_wrtmeta(BTREE_P);
  62. /* btree.c */
  63. DB *btree_open(const char *, int, int, const BTREEINFO *);
  64. BTREE bt_open(const char *, int, int , BTREEINFO *);
  65. int bt_get(DB *, DBT *, DBT *, u_long);
  66. int bt_put(DB *, DBT *, DBT *, u_long);
  67. int bt_delete(DB *, DBT *, u_long);
  68. int bt_sync(DB *);
  69. int bt_seq(DB *, DBT *, DBT *, u_long);
  70. int bt_close(DB *);
  71. /* bigkey.c */
  72. int __big_insert(BUFHEAD *, DBT *, DBT *);
  73. int __big_delete(BUFHEAD *, int);
  74. int __find_bigpair(BUFHEAD *, int, char *, int);
  75. u_short __find_last_page(BUFHEAD **);
  76. int __big_return(BUFHEAD *, int, DBT *, int);
  77. int __big_keydata(BUFHEAD *, int, DBT *, DBT *, int);
  78. int __big_split(BUFHEAD *, BUFHEAD *, BUFHEAD *, u_short, u_int, SPLIT_RETURN *);
  79. /* buf.c */
  80. BUFHEAD *__get_buf(u_int, BUFHEAD *, int);
  81. void __buf_init(int);
  82. int __buf_free(int, int);
  83. void __reclaim_buf(BUFHEAD *);
  84. /* log2.c */
  85. int __log2(int);
  86. /* insert.c */
  87. int _bt_insert(BTREE_P, BTITEM *, DBT *, DBT *, int);
  88. int _bt_inserti(BTREE_P, IDATUM *, pgno_t);
  89. int _bt_insertat(BTREE_P, char *, index_t);
  90. /* split.c */
  91. int _bt_split(BTREE_P);
  92. int _bt_reposition(BTREE_P, IDATUM *, pgno_t, pgno_t);
  93. int _bt_isonpage(BTREE_P, IDATUM *, pgno_t);
  94. int _bt_splitroot(BTREE_P);
  95. int _bt_dosplit(BTREE_P, BTHEADER *, BTHEADER *);
  96. /* dynahash.c */
  97. DB *hash_open(const char *, int, int, const HASHINFO *);
  98. int __expand_table(void);
  99. u_int __call_hash(char *, int);
  100.  
  101. extern inline int isspace(char c) {
  102.     return ( ((c) == ' ') || ((c) == '\n') || ((c) == '\r')
  103.     || ((c) == '\t') || ((c) == '\f') );
  104. }
  105. #endif
  106.